#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
ll solve()
{
    ll ans = 0;
    for (ll i = 1; i<= 2025; i++)
    {
        if(i%3==0||i%38==0||i%8==0)
        {
            ans++;
        }
    }
    return ans;
}
int main()
{
   int t = 1;
   // cin >> t;
    while(t--)
    {
        cout << solve() << endl;
    }
   return 0;
}
